package com.gaattc.model.vo;

import java.util.List;

public class OrderVO {

    private int id;

    private double amount;

    private int num;

    private int goodsDetailId;

    private int state;

    private String goods;

    private int goodsId;

    private List<SpecVO> spec;

    private String specName;

    private StatesVO[] states = new StatesVO[]{new StatesVO(0, "未付款"), new StatesVO(1, "未发货"), new StatesVO(2, "已发货"), new StatesVO(3, "已完成订单")};

    private StatesVO curState;

    private  SpecVO curSpec;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public double getAmount() {
        return amount;
    }

    public void setAmount(double amount) {
        this.amount = amount;
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }

    public int getGoodsDetailId() {
        return goodsDetailId;
    }

    public void setGoodsDetailId(int goodsDetailId) {
        this.goodsDetailId = goodsDetailId;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
        if(state == 0){
            this.curState = new StatesVO(0,"未付款");
        }else if(state == 1){
            this.curState = new StatesVO(1,"未发货");
        }else if(state == 2){
            this.curState = new StatesVO(2,"已发货");
        }else if(state == 3){
            this.curState = new StatesVO(3,"已完成订单");
        }
    }

    public String getGoods() {
        return goods;
    }

    public void setGoods(String goods) {
        this.goods = goods;
    }

    public List<SpecVO> getSpec() {
        return spec;
    }

    public void setSpec(List<SpecVO> spec) {
        this.spec = spec;
    }

    public int getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(int goodsId) {
        this.goodsId = goodsId;
    }

    public String getSpecName() {
        return specName;
    }

    public void setSpecName(String specName) {
        this.specName = specName;
    }

    public SpecVO getCurSpec() {
        return curSpec;
    }

    public void setCurSpec(SpecVO curSpec) {
        this.curSpec = curSpec;
    }
}
